<extend name="public@emptypage" />
<block name="content">
<div class="card">
<div class="card-header card-header-primary">
    <ul class="nav nav-tabs" data-tabs="tabs">
        <li class="nav-item">
          <a class="nav-link active"  href="{:url('mailer/index')}">{:lang('ADMIN_MAILER_INDEX')}</a>
      </li>
        <li class="nav-item">
          <a class="nav-link"  href="{:url('mailer/template')}?template_key=verification_code">数字验证码邮件模板</a>
      </li>
    </ul>
</div>

    <div class="row">
            <div class="col-md-12">
                  <div class="card-body">
            <form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('Admin/mailer/indexPost')}">
                <div class="form-group">
                    <label for="input-from_name" class="col-sm-3 control-label">
                        <span class="form-required">*</span>
                        {:lang('SENDER_NAME')}
                        <a href="http://www.thinkcmf.com/faq.html?url=https://www.kancloud.cn/thinkcmf/faq/493502"
                           title="查看帮助手册"
                           data-toggle="tooltip"
                           target="_blank"><i class="fa fa-question-circle"></i></a>
                    </label>
                    <div class="col-md-6 col-sm-9">
                        <input type="text" class="form-control" id="input-from_name" name="from_name"
                               value="{$from_name|default=''}">
                    </div>
                </div>
                <div class="form-group">
                    <label for="input-from" class="col-sm-3 control-label">
                        <span class="form-required">*</span>{:lang('SENDER_EMAIL_ADDRESS')}
                    </label>
                    <div class="col-md-6 col-sm-9">
                        <input type="text" class="form-control" id="input-from" name="from" value="{$from|default=''}">
                    </div>
                </div>
                <div class="form-group">
                    <label for="input-host" class="col-sm-3 control-label">
                        <span class="form-required">*</span>{:lang('SENDER_SMTP_SERVER')}
                    </label>
                    <div class="col-md-6 col-sm-9">
                        <input type="text" class="form-control" id="input-host" name="host" value="{$host|default=''}">
                    </div>
                </div>
                <div class="form-group">
                    <label for="js-smtpsecure" class="col-sm-3 control-label">
                        <span class="form-required">*</span>连接方式
                    </label>
                    <div class="col-md-6 col-sm-9">
                        <select name="smtp_secure" id="js-smtpsecure" class="form-control">
                            <option value="">默认</option>
                            <option value="ssl">ssl</option>
                            <option value="tls">tls</option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label for="input-port" class="col-sm-3 control-label">
                        <span class="form-required">*</span>SMTP服务器端口
                    </label>
                    <div class="col-md-6 col-sm-9">
                        <input type="text" class="form-control" id="input-port" name="port" value="{$port|default=''}"
                               placeholder="默认为25">
                    </div>
                </div>
                <div class="form-group">
                    <label for="input-login_name" class="col-sm-3 control-label">
                        <span class="form-required">*</span>{:lang('SMTP_MAIL_ADDRESS')}
                    </label>
                    <div class="col-md-6 col-sm-9">
                        <input type="text" class="form-control" id="input-login_name" name="username"
                               value="{$username|default=''}">
                    </div>
                </div>
                <div class="form-group">
                    <label for="input-password" class="col-sm-3 control-label">
                        <span class="form-required">*</span>{:lang('SMTP_MAIL_PASSWORD')}
                    </label>
                    <div class="col-md-6 col-sm-9">
                        <input type="password" class="form-control" id="input-password" name="password"
                               value="{$password|default=''}">
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-9">
                        <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('SAVE')}</button>
                        <a class="btn btn-warning"
                           href="javascript:parent.openIframeDialog('{:url('mailer/test')}','发送测试邮件',{width:'600px',height:'400px'});">测试邮件</a>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
</div>
</block>
<!-- <script src="__STATIC__/js/admin.js"></script>
<script>
    $(function () {
        $('#js-smtpsecure').val("{$smtp_secure|default=''}");
    });
</script>
</body>
</html> -->